<?php
    include_once("checkAuthenticationAction.php");
    include_once("../service/articleService.php");
    include_once("../util/constant.php");
    $title = $_POST["pageTitle"];
    $order = $_POST["order"];
    $result = createPage($title,$order,"","");
    if($result){
        echo "<script>window.location.href='../admin/page.php';</script>";    
    }else{
        echo "<script>window.location.href='../admin/page-detail.php?action=".NEW_ACTION."';</script>";
    }
    
?>
